/**2013-4-10
 zhangqj
 * 
 */
package com.data;

import java.sql.Connection;

/**
 * @author zhangqj
 *2013-4-10
 */
public class DBFactory {
	private DBConnection conn=new  DBConnection();
				 
	public  DBConnection getDBConnectionInstance(){
		if(conn==null){
			conn=new DBConnection();
			return conn;
		}
		return conn;
	}
	
	public void closeConnection(Connection db){
		if(conn==null){
			conn=new DBConnection();
		}
		conn.closeConnection(db);
		
	}

}
